{template 'common/header-base'}
<style type="text/css">
    .we7-table td{
      text-align: center;
    }
     /*个人自定义*/
  .form-controls .img-thumbnail{
      width:200px;
      height:200px;
  }
</style>
{if $op == 'display'}
<div style="margin: 20px;">
    <div>
        <a href="{php echo $this->createWeburl('service', array('op'=>'post'))}"  class="btn btn-primary we7-padding-horizontal" style="margin-bottom: 20px">添加员工</a>
    </div>
</div>
<form class="form-horizontal" action="" method="post">
    <div class="panel panel-default">
        <div class="panel-body">
            <input type="text" class="form-control " id="keyword"  name="keyword" placeholder="请输入员工编号" style="width:80%; display:block; float: left;" />
            <input type="submit" class="btn btn-primary col-lg-1" name="submit" value="确认" style="margin-left:5%;float: left;" />
        </div>
    </div>
    <table class="table we7-table table-hover article-list vertical-middle">
        <tr>
            <td style="width:100px">排序</td>
            <td>员工名称</td>
            <td>员工头像</td>
            <td>员工工号</td>
            <td>员工电话</td>
            <!-- <td>服务人员口号</td> -->
            <td>员工状态</td>
            <td>服务分类</td>
            <td>接单数</td>
            <td>业绩总额</td>
            <td>加入时间</td>
            <td>擅长领域</td>
            <td class="text-right">操作</td>
        </tr>
        {loop $products $item}
        <tr>
            <td>
                {$item['fw_id']}
            </td>
            <td>
                {$item['fw_name']}
            </td>
            <td>
                <img src="{media $item['fw_thumb']}" style="width: 100px;height: 100px;" alt="">
            </td>
            <td>
                {$item['fw_gonghao']}
            </td>
            <td>
                {$item['fw_telphone']}
            </td>
            <td>
                {if $item['fw_status']==1}上线{elseif $item['fw_status']==0}下线{/if}
            </td>
            <td>
                {$item['xt_name']}
            </td>
            <td>
                {$item['ordernum']}
            </td>
            <td>
                {if $item['total']==null}
                0
                {/if}
                {$item['total']}
            </td>
            <td>
                {$item['fw_addtime']}
            </td>
            <td>
                {$item['fw_lingyu']}
            </td>
            <td class="text-right">
                <a class="btn btn-default btn-sm" href="{php echo $this->createWeburl('service', array('fw_id' => $item['fw_id'], 'op' =>'post'))}" >编辑</a>
                <a class="btn btn-default btn-sm" onclick="return confirm('此操作不可恢复，确认吗？'); return false;" href="{php echo $this->createWeburl('service', array('fw_id' => $item['fw_id'], 'op' => 'delete'))}">删除</a>
            </td>
        </tr>
        {/loop}
    </table>
</form>
{/if}
{if $op == 'post'}
<form class="form-horizontal" action="" method="post">
    <div class="panel panel-default">
        <div class="panel-heading">
            <h3 class="panel-title">添加技师</h3>
        </div>
        <div class="panel-body">
            <div class="form-group">
                <label for="" class="control-label col-sm-1" >服务人员名称</label>
                 <div class="form-controls col-sm-5" style="margin-left: 75px;">
                    <input type="text" id="fw_name" name="fw_name" value="{$items['fw_name']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-4 help-block">服务人员名称</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-1">服务人员头像</label>
                <!-- <div class="col-sm-1"></div> -->
                <div class="form-controls col-sm-5" style="margin-left: 75px;">
                    {php echo tpl_form_field_image('fw_thumb', $items['fw_thumb'])}
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-4 help-block">服务人员头像</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-1" >服务人员工号</label>
                 <div class="form-controls col-sm-5" style="margin-left: 75px;">
                    <input type="text" id="fw_gonghao" name="fw_gonghao" value="{$items['fw_gonghao']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-4 help-block">服务人员工号</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-1" >服务人员电话</label>
                 <div class="form-controls col-sm-5" style="margin-left: 75px;">
                    <input type="text" id="fw_telphone" name="fw_telphone" value="{$items['fw_telphone']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-4 help-block">服务人员电话</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-1" >服务人员口号</label>
                 <div class="form-controls col-sm-5" style="margin-left: 75px;">
                    <input type="text" id="fw_kouhao" name="fw_kouhao" value="{$items['fw_kouhao']}" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  placeholder="" autocomplete="off">
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-4 help-block">服务人员口号</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-1" >服务人员状态</label>
                 <div class="form-controls col-sm-5" style="margin-left: 75px;">
                     <label class="select_one">
                        <input type="radio" name="fw_status"  value="1" {if $items['fw_status'] == '1'} checked{/if} />上线
                        <input type="radio" name="fw_status"  value="0" {if $items['fw_status'] == '0'} checked{/if} />下线
                    </label>
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-4 help-block">服务人员状态</div>
            </div>
            <div class="form-group">
                <label for="" class="control-label col-sm-1">服务分类</label>
                <div class="form-controls col-sm-5" style="margin-left: 75px;">
                    <select name="fw_type" id="fw_type" class="form-control">
                        <option value="">--请选择--</option>
                        {loop $type $item}
                        <option value="{$item['xt_id']}" {if $item['xt_id']==$items['fw_type']}selected{/if} >{$item['xt_name']}</option>
                        {/loop}
                    </select>
                </div>
            </div>
           
            <div class="form-group">
                <label for="" class="control-label col-sm-1">服务人员擅长领域</label>
                <!-- <div class="col-sm-1"></div> -->
                <div class="form-controls col-sm-5" style="margin-left: 75px;">                   
                   <textarea rows="6" cols="20" class="form-control ng-pristine ng-untouched ng-valid ng-empty"  name="fw_lingyu" id="fw_lingyu">{$items['fw_lingyu']}</textarea>
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-4 help-block">服务人员擅长领域</div>
            </div>
             <div class="form-group">
                <label for="" class="control-label col-sm-1">服务人员详情图片</label>
                <!-- <div class="col-sm-1"></div> -->
                <div class="form-controls col-sm-5" style="margin-left: 75px;">
                    {php echo tpl_form_field_image('fw_thumbs', $items['fw_thumbs'])}
                </div>
                <div class="col-sm-1"></div>
                <div class="form-controls col-sm-4 help-block">服务人员详情图片</div>
            </div>
        </div>
    </div>
    <div class="form-group">
        <div class="col-sm-12">
            <input name="token" type="hidden" value="{$_W['token']}" />
            <input type="submit" class="btn btn-primary col-lg-1" name="submit" value="提交" style="margin-left: 45%;" />
        </div>
    </div>
</form>
{/if}
